package com.explorati.interview.interview.chapterfour;

public class StringPoolTest {

	public static void main(String[] args) {
		Dog dog1 = Dog.newInstance("lele", 30);
		Dog dog2 = Dog.newInstance("lele", 30);
		Dog dog3 = new Dog("lele",30);
		//true
		System.out.println(dog1 == dog2);
		//false
		System.out.println(dog1 ==dog3);
	}
}
